import Router from 'koa-router';
import login from '../../../controller/api/account/login';
import getAccountInfo from '../../../controller/api/account/getAccountInfo';
import sendPhoneCode from '../../../controller/api/account/sendPhoneCode';
import register from '../../../controller/api/account/register';
import verifyCode  from '../../../controller/api/account//verifyCode';
import updateUserInfo from '../../../controller/api/account/updateUserInfo';
import forgetPassword from '../../../controller/api/account/forgetPassword';

const accountRouter = new Router();

// 登录
accountRouter.post('/login', login);

// 获取用户信息
accountRouter.post('/getAccountInfo', getAccountInfo);

// 获取短信验证码
accountRouter.post('/sendCode', sendPhoneCode);

// 注册
accountRouter.post('/register', register);

// 验证短信验证码
accountRouter.post('/verifyCode', verifyCode);

// 忘记密码
accountRouter.post('/forgetPassword', forgetPassword);

// 更新用户信息
accountRouter.post('/updateUser', updateUserInfo);

export default accountRouter;